﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
using System.Data.Odbc;
using System.Data;
namespace rtfd
{
    class Program
    {
        static void Main(string[] args)
        {
            string dta = "server=.;database = blogs；uid=sa;pwd=chen5201314";
            var sqlConnection = new SqlConnection(dta);
            sqlConnection.Open();
            SqlCommand sqlCommand = new SqlCommand("select * from Users", sqlConnection);
            var dka = sqlCommand.ExecuteReader();
            while (dka.Read())
            {
                Console.WriteLine("{0}\t{1}\t{2}\t", dka["Id"], dka["name"], dka["stringId"]);
            }
            sqlConnection.Close();




        }
    }
}


  
